<?php
	include_once("inc/conn.php");
	include_once("inc/function.php");
	include_once("heheadmin/inc/config.php");
	login_check();
	$is_check_mobile=0;
	$act=intval($_GET['act'])?$_GET['act']:0;
	$usersid=$_SESSION['usersid'];
	$sql = "select is_check_mobile from users where id = '{$usersid}' limit 1";
	$result = $db->query($sql);
	$users = $db->fetch_row($result);
	if(empty($users)){
		header("Location: login.php");
		exit();
	}
 
	if($users[0]==0){
		echo ChangeEncodeU2G('<script language="javascript">
				alert("为了帐号安全，你需要先绑定手机再进入游戏!");
				location.href = "/member.php";
			 </script>');
		exit();
	}
?>
<!DOCTYPE html>
<html>
<head>
<link type="image/x-icon" rel="shortcut icon" href="../images/favicon.ico" />
<meta name="keywords" content="<?php echo $web_keywords;?>" />
<meta name="description" content="<?php echo $web_description;?>" />
<title>保时捷28,蛋蛋28,加拿大28,幸运28,PC蛋蛋,<?php echo $web_name;?></title>
<?php 
    require 'public/title.inc.php';
?>
<link rel="stylesheet" type="text/css" href="style/game.css" />
<script type="text/javascript" src="js/cookie.js"></script>
<script type="text/javascript" src="js/jquery.jplayer.min.js"></script>
<script type="text/javascript">
	var timerid;
	$(document).ready(function(){
		var id = (getCookie("showid") == "")?"0":getCookie("showid");
		setCookie("is_play",0);
		<!--var act=<?php echo $act;?>;-->
		var act=3
		show(act>=0?act:id);
		<!--show(act>0?act:id);-->
		$("#jquery_jplayer_1").jPlayer({
			ready: function () {
				$(this).jPlayer("setMedia", {
					title: "Bubble",
					mp3: "/images/operateRemind.mp3"
				});
			},
			swfPath: "/images/jplayer",
			supplied: "mp3",
			wmode: "window"
		});
	});
	function show(num){
		$("[id^=game_]").removeClass("pick");
		$("#game_" + num).removeClass("pick").addClass("pick");
		setCookie("showid",num);
		getContent("sgame.php?act=" + num + "&t=" + Math.random(),'');
		get_dou();
	}
	function getContent(url,tab_id){
		if(typeof(timerid) != "undefined")
			clearInterval(timerid);
		$.get(url,{},function(ret){
			$("#content").html(ret);
		});	
		if (tab_id != '') {
			$("#role").attr('class','');
			$("#rec").attr('class','');
			$("#mod").attr('class','');
			$("#auto").attr('class','');
			$("#pic").attr('class','');
			$("#tot").attr('class','');
			$("#"+tab_id).attr('class','active');
		}
	}
	function get_dou() {
		$.get('b.php?c=user&a=get_ledou',function(ret){
			$("#dou").html(ret);
		});
	}
	function showrecord(name,url)
	{
		$.openPopupLayer({
			name: name,
			width: 840,
			height: 500,
			url: url
		});
	}
	function openrecord(name,w_width,w_height,url)
	{
		$.openPopupLayer({
			name: name,
			width: w_width,
			height: w_height,
			url: url
		});
	}
	function closerecord(name)
	{
		clearInterval(timerid);
		$.closePopupLayer(name);
	}
	issond = 1;
	function sondclick(t)
	{
		var src=$(t)[0].src;
		if(src.indexOf("S_Close.gif")>0){
			issond = 1;
			$(t).attr("src", "/images/S_Open.gif");
			setCookie("issond",1);
			console.log(issond);
		} else {
			issond = 0;
			$(t).attr("src", "/images/S_Close.gif");
			setCookie("issond",0);
			console.log(issond);
		}
	}

</script>
</head>
<? include_once("top2.php");?>
<link rel="stylesheet" type="text/css" href="style/yj_game.css" />
<audio id="yj_audio" src="images/9337.mp3" hidden="true" >
</audio>
<div id="jquery_jplayer_1"  ></div>
	<div class="yj_container" style="margin-top: 104px;">
		<div class="bcol-fff">
			<div class="game-type">
				<div id="game_3" onclick="javascript:show(3)">蛋蛋28</div>
				<div  id="game_8" onclick="javascript:show(8)" >加拿大28</div>
			</div>
			<ul class="game-title clearfix">
				<li id="role" onclick="javascript:getContent('sgamerule.php?act=3&sid=2','role')">游戏规则</li>
				<li id="rec" onclick="javascript:getContent('sgamerecord.php?act=3&sid=3','rec')">投注记录</li>
				<li id="mod" onclick="javascript:getContent('smodel.php?act=3&sid=4','mod')">模式编辑</li>
				<li id="auto" onclick="javascript:getContent('sautopress.php?act=3&sid=5','auto')">自动投注</li>
				<li id="pic" onclick="javascript:getContent('strend.php?act=3&sid=7','pic')">走势图</li>
				<li id="tot" onclick="javascript:getContent('swinstat.php?act=3&sid=8','tot')">盈利统计</li>
			</ul>
			<div id="divContent">
				<div class="container" id="content">	
				</div>
			</div>
		</div>
	</div>
</div>
<? include_once("yj_footer.php"); ?>
</body>
</html>
